package com.selen.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author Selen
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "PermissionInsertDTO", description = "权限添加DTO")
public class PermissionInsertDTO implements Serializable {

    /**  权限名称  */
    @NotEmpty(message = "权限名称不能为空")
    @Schema(description = "权限名称", example = "修改权限")
    private String title;

    /**  跳转地址  */
    @NotEmpty(message = "跳转地址不能为空")
    @Schema(description = "跳转地址", example = "localhost:8101/doc.html/school/list")
    private String url;

    /**  权限图标  */
    @NotEmpty(message = "权限图标不能为空")
    @Schema(description = "权限图标", example = "1.png")
    private String icon;

    /** 父权限主键 */
    @NotEmpty(message = "父权限主键不能为空")
    @Schema(description = "父权限主键，0为根节点", example = "1")
    private Integer pid;

    /**  权限描述  */
    @Schema(description = "权限描述", example = "对数据库进行修改")
    private String info;


}